#include <cubefs/core/tools/types/typelist.hpp>
#include <cubefs/core/tools/types/sublist.hpp>
#include <cubefs/core/tools/types/hierarchy.hpp>

#include <cubefs/core/container/container.hpp>


#include <typeinfo>
#include <iostream>

#include <stdlib.h>

using namespace std;

using namespace cubefs::core;

using namespace cubefs::core::tools;
using namespace cubefs::core::container;
using namespace cubefs::core::tools::types::typelist;
using namespace cubefs::core::tools::types::hierarchy;

class FactoryName{};
class ProfileName{};

template <typename ProfileType>
struct Class {
    typedef typename TypeLocator<Profile<ProfileName, ProfileType>, FactoryName>::Type Type;
};

namespace cubefs    {
namespace core      {
namespace container {

template <typename ProfileType, typename Default>
class TypeFactory<RootProfile, ProfileType, FactoryName, Default>    {
public:
    typedef Long Type;
};


//template <typename Base, typename ProfileType, typename Default>
//class TypeFactory<Profile<ProfileName, Base>, ProfileType, FactoryName, Default>    {
//public:
//    typedef Int Type;
//};

}
}
}

int main(int argc, char** argv) {

    typedef Class<RootProfile> DClass;

    cout<<typeid(DClass::Type).name()<<endl;

    return (EXIT_SUCCESS);
}

